package com.xm.settlement.service.impl;

import com.baomidou.framework.service.impl.SuperServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;
import com.xm.settlement.commons.utils.PageInfo;
import com.xm.settlement.mapper.AppCashLogMapper;
import com.xm.settlement.model.AppCashLog;
import com.xm.settlement.service.IAppCashLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/3/2.
 */
@Service
public class AppCashLogServiceImpl extends SuperServiceImpl<AppCashLogMapper,AppCashLog> implements IAppCashLogService {

    @Autowired
    private AppCashLogMapper appCashLogMapper;

    @Override
    public void selectDataGrid(PageInfo pageInfo,Long createId) {
        Page<AppCashLog> page = new Page<AppCashLog>(pageInfo.getNowpage(), pageInfo.getSize());
        List<AppCashLog> list = appCashLogMapper.selectAppCashLogList(page,createId);
        pageInfo.setRows(list);
        pageInfo.setTotal(page.getTotal());
    }

    @Override
    public void updateStatus(Long id) {
        appCashLogMapper.updateStatus(id);
    }

    @Override
    public void insertRemarkById(Map map) {
        appCashLogMapper.insertRemarkById(map);
    }

}
